//
//  HttpUtils.h
//  Weike
//
//  Created by leirz on 14-3-12.
//  Copyright (c) 2014年 winupon. All rights reserved.
//


#import <Foundation/Foundation.h>


@interface HttpRequest : NSObject

/**
 * 获取当前实例
 */
+ (HttpRequest *)sharedHttpRequest;


/**
 * POST 请求
 * @param urlName 请求地址：service名称
 * @param params 请求参数
 * @param complete 回调函数
 */
- (void)post:(NSString *)urlName params:(NSDictionary *)params complete:(void (^)(BOOL success, NSDictionary *result))complete;

/**
 * GET请求
 */
- (void)get:(NSString *)urlName params:(NSDictionary *)params complete:(void (^)(BOOL success, NSDictionary *result))complete;

/**
 * 参数是数组格式的
 */
- (void)get:(NSString *)urlName arrayParams:(NSArray *)params complete:(void(^)(BOOL success, NSDictionary *result))complete;

@end
